function EditorPage() {
    this.index = null;
    this.allocRect = []; //AlocationRect
    this.editorDoc = null;
    this.pdPage = null;//PDPage object
    this.layoutInfo = null; //PageLayoutInfo object

    this.GetPDPage = function () { return this.pdPage; };
    this.SetPDPage = function (page) { this.pdPage = page; };
    this.curFocusObj = null; //current focus object
    this.curFocusObjType = null;//object type (text,path,image...)
    this.caretPos = []; //caret position
    
    this.SetIndex = function (id) {
        this.index = id;
    };
    this.GetIndex = function () {
        return this.index;
    };
    this.GetPageWidth = function () {
        var width = null;
        var height = null;
        var nRotate = 0;
        if (null != this.pdPage) {
            width = this.pdPage.GetSize()[0];
            height = this.pdPage.GetSize()[1];
            nRotate = this.pdPage.rotate;
        }
        else {
            var pageInfo = this.editorDoc.pdDoc.GetPageInfo(this.index);
            width = pageInfo.m_fWidth; //this.editorDoc.pdDoc.GetPageSizeArr()[this.index].w;
            height = pageInfo.m_fHeight; //this.editorDoc.pdDoc.GetPageSizeArr()[this.index].h;
            nRotate = pageInfo.m_nRotate; //this.editorDoc.pdDoc.GetPageSizeArr()[this.index].rotate;
        }
       // if (nRotate === 1 || nRotate === 3) { return height; }
        // else { return width; }

        return width; 
    };
    this.GetPageHeight = function () {
    	var width = null;
    	var height = null;
    	var nRotate = 0;
    	if (null != this.pdPage) {
    		width = this.pdPage.GetSize()[0];
    		height = this.pdPage.GetSize()[1];
    		nRotate = this.pdPage.rotate;
    	}
        else {
            var pageInfo = this.editorDoc.pdDoc.GetPageInfo(this.index);
            width = pageInfo.m_fWidth; //this.editorDoc.pdDoc.GetPageSizeArr()[this.index].w;
            height = pageInfo.m_fHeight; //this.editorDoc.pdDoc.GetPageSizeArr()[this.index].h;
            nRotate = pageInfo.m_nRotate; //this.editorDoc.pdDoc.GetPageSizeArr()[this.index].rotate;
        }
      //  if (nRotate === 1 || nRotate === 3){return width;}
        //  else {return height;}
        return height;
    };
    
    
}